package io.reader;

import framework.AbstractTest;
import utils.Log;

import java.io.StringReader;

/**
 * Created by shane on 2018/5/21.
 */
public class MemoryInput extends AbstractTest {
    protected static final String TAG = MemoryInput.class.getName();

    @Override
    public void test(String[] args) {
        super.test(args);
        String filename = getDefInputFile(args);
        try {
            StringReader in = new StringReader(BufferedInputFile.read(filename));
            int c;
            while ((c = in.read()) != -1) {
                // char 支持中文
                Log.v((char)c);
            }
        } catch (Exception e) {

        }
    }

    @Override
    protected String getTag() {
        return TAG;
    }
}
